Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add option to disable context menu entry #374

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

SunsetTechuila
Copy link
Member

@SunsetTechuila SunsetTechuila commented Nov 27, 2024

and hide the entry when editorconfig already exists

  • Use a meaningful title for the pull request.
  • Use meaningful commit messages.
  • Run tsc w/o errors (same as npm run build).
  • Run npm run lint w/o errors.

fixes #331
fixes #212

@xuhdev
Copy link
Member

xuhdev commented Jan 30, 2025

I can help review this one as well. Could you rebase, add a bit more context and relevant tests (if applicable)?

@SunsetTechuila SunsetTechuila force-pushed the menu branch 2 times, most recently from 2fcbd24 to 489b86a Compare January 30, 2025 15:09
@SunsetTechuila
Copy link
Member Author

SunsetTechuila commented Jan 30, 2025

editorconfig extension adds this context menu entry:

image

I've:

  • implemented a setting to disable it
  • made it so that the entry would be hidden when workspace already contains .editorconfig (reason)

@xuhdev
Copy link
Member

xuhdev commented Jan 30, 2025

👍 Do you know if this feature is testable? This sounds like a useful feature that we should better ensure it survives future changes.

@SunsetTechuila
Copy link
Member Author

I don't think it's possible to check whether the entry actually appears in the menu or not, but the state can be tested. I will add tests later.

@SunsetTechuila SunsetTechuila force-pushed the menu branch 2 times, most recently from 4fb01db to c80343d Compare January 31, 2025 00:01
@SunsetTechuila
Copy link
Member Author

I've removed the code related to hiding the entry when an .editorconfig file is detected in the workspace. The current version of the extension allows generating an .editorconfig file inside any selected folder in the file tree view. However, it is not possible to determine which specific folder is selected using the available VSCode APIs.

Copy link
Member

@xuhdev xuhdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This will go to 0.17.0, which I plan to release shortly after 0.16.7 (allow a little time to track down some bugs as there was a large dependency change in 0.16.7)

@xuhdev xuhdev merged commit 3798cff into editorconfig:main Feb 3, 2025
9 checks passed
@SunsetTechuila SunsetTechuila deleted the menu branch February 4, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Ability to hide the "Generate editorconfig" Remove from context menu
2 participants